SUBDIRPATH = /Work/Dev/tabvd/server/tabvd.main/test

DIROBJ = ./$(OUTPUTPATH)/obj

SOURCEFILES = $(wildcard ./*.cpp)
OBJECTFILES = $(addprefix $(DIROBJ)/, $(notdir $(SOURCEFILES:.cpp=.o)))

all: $(OBJECTFILES) 


$(DIROBJ)/%.o : %.c $(DIROBJ)
	@echo 'Compile Target --> $<'
	@echo 'Compiler --> $(CC)...'
	@echo 'Compiler Flags --> [CFLAGS:$(CFLAGS)] [CXXFLAGS:$(CXXFLAGS)]...'
	@echo 'Include Paths --> $(INCLUDES)'
	$(CC) -c $(CFLAGS) $(CXXFLAGS) $(INCLUDES) -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$(*F).c"

$(DIROBJ)/%.o : %.cpp $(DIROBJ)
	@echo 'Compile Target --> $<'
	@echo 'Compiler --> $(CC)...'
	@echo 'Compiler Flags --> [CFLAGS:$(CFLAGS)] [CXXFLAGS:$(CXXFLAGS)]...'
	@echo 'Include Paths --> $(INCLUDES)'
	$(CXX) -c $(CFLAGS) $(CXXFLAGS) $(INCLUDES) -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$(*F).cpp"

$(DIROBJ):
	@echo 'Creating directory $(DIROBJ)...'
	mkdir -p $(DIROBJ)

.PHONY: all
